package com.kgar.entity.graph.node;


import com.kgar.entity.graph.relationship.MatchWithRelation;
import lombok.Data;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;
import java.util.List;
import java.util.Objects;

@Node("Resume")
@Data
public class ResumeNode {

    @Id
    private Integer resumeId;

    private Integer userId;

    private String resumeName;

    private List<String> tags;

    private String link ="";

    @Relationship("MATCH_WITH")
    private List<MatchWithRelation> matchWithRelations;
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ResumeNode that = (ResumeNode) o;
        return Objects.equals(resumeId, that.resumeId) && Objects.equals(userId, that.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(resumeId, userId);
    }

}
